package com.tsj.spzx.mapper;

import com.tsj.spzx.model.dto.system.SysUserDto;
import com.tsj.spzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysUserMapper {
    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    SysUser findUserInfoByName(String userName);

    /**
     * 根据条件分页查询用户信息
     * @param sysUserDto
     * @return
     */
    List<SysUser> findByPage(SysUserDto sysUserDto);

    /**
     * 添加用户
     * @param sysUser
     */
    void saveSysUser(SysUser sysUser);

    /**
     * 修改用户信息
     * @param sysUser
     */
    void updateSysUser(SysUser sysUser);

    /**
     * 根据id删除用户
     * @param userId
     */
    void deleteSysUser(Integer userId);
}
